[Storybook] Add stories for more components (letter P) - Part 1#7648
Merged
mgadewoll merged 20 commits intoelastic:mainfrom Apr 11, 2024
Merged
[Storybook] Add stories for more components (letter P) - Part 1#7648mgadewoll merged 20 commits intoelastic:mainfrom
mgadewoll merged 20 commits intoelastic:mainfrom
Conversation
- updates internal helper _updateArgTypes to handle multiple control config entries at once + adds additional util enableToggleFunctionControls
- updates PageHeader story + adds PageHeaderContent and PageTempalte stories - adds type for page directions prop to be reused
mgadewoll
commented
Apr 3, 2024
mgadewoll
commented
Apr 3, 2024
mgadewoll
commented
Apr 3, 2024
mgadewoll
commented
Apr 3, 2024
cee-chen
reviewed
Apr 3, 2024
cee-chen
reviewed
Apr 3, 2024
cee-chen
reviewed
Apr 3, 2024
cee-chen
reviewed
Apr 3, 2024
cee-chen
reviewed
Apr 3, 2024
cee-chen
reviewed
Apr 3, 2024
cee-chen
reviewed
Apr 3, 2024
- updates enableFunctionToggleControls to overwrite global actions behaviour and set a default for function props + add unit tests for enableFunctionToggleControls
- updates restrictWidth control to select = adds additional stories for EuiPageTemplate
cee-chen
reviewed
Apr 5, 2024
cee-chen
reviewed
Apr 5, 2024
mgadewoll
commented
Apr 9, 2024
mgadewoll
commented
Apr 9, 2024
11 tasks
- removes skeleton in favor of string to ensure valid HTML + adds parent= on bottom bar to ensure last position on DOM updates
Turns out the context needed a parent `{}` reference that updates on prop update, which the `useContext()`+setting child properties directly was messing up. Instantiating a new object value via `useMemo` solves the issue
+ opinionated syntax cleanup while here (use fewer functions - not sure why they needed to be functions??) and destructure more
…cloneElement` - cleaner and matches existing behavior for other subcomponents - consumers who render `<EuiPageTemplate><EuiPageSidebar>` will see broken-ish behavior, but they shouldn't be doing this in any case
- not sure how useful this is since `children` is very difficult to memoize on
i'm a senior developer errybody
cee-chen
approved these changes
Apr 10, 2024
Contributor
cee-chen
left a comment
There was a problem hiding this comment.
I think I have EuiPageTemplate working now (and hopefully much cleaner in terms of code 💦) - let me know if anything looks off to you or if you're not a fan of any of any particular code style/syntax!
mgadewoll
commented
Apr 11, 2024
Contributor
|
Not quite test-driven development, but QA-driven development nonetheless 😄 Feel free to merge this in whenever @mgadewoll! |
|
Preview staging links for this PR:
|
Collaborator
💚 Build Succeeded
History
|
cee-chen
added a commit
to elastic/kibana
that referenced
this pull request
May 3, 2024
`v94.1.0-backport.0` ⏩ `v94.2.1-backport.0` _[Questions? Please see our Kibana upgrade FAQ.](https://github.com/elastic/eui/blob/main/wiki/eui-team-processes/upgrading-kibana.md#faq-for-kibana-teams)_ --- ## [`v94.2.1-backport.0`](https://github.com/elastic/eui/releases/v94.2.1-backport.0) **This is a backport release only intended for use by Kibana.** - Reverted the `EuiFlexGroup`/`EuiFlexItem` `component` prop feature due to Kibana typing issues ## [`v94.2.1`](https://github.com/elastic/eui/releases/v94.2.1) **Bug fixes** - Fixed an `EuiTabbedContent` edge case bug that occurred when updated with a completely different set of `tabs` ([#7713](elastic/eui#7713)) - Fixed the `@storybook/test` dependency to be listed in `devDependencies` and not `dependencies` ([#7719](elastic/eui#7719)) ## [`v94.2.0`](https://github.com/elastic/eui/releases/v94.2.0) - Updated `getDefaultEuiMarkdownPlugins()` to allow excluding the following plugins in addition to `tooltip`: ([#7676](elastic/eui#7676)) - `checkbox` - `linkValidator` - `lineBreaks` - `emoji` - Updated `EuiSelectable`'s `isPreFiltered` prop to allow passing a configuration object, which allows disabling search highlighting in addition to search filtering ([#7683](elastic/eui#7683)) - Updated `EuiFlexGroup` and `EuiFlexItem` prop types to support passing any valid React component type to the `component` prop and ensure proper type checking of the extra props forwarded to the `component`. ([#7688](elastic/eui#7688)) - Updated `EuiSearchBar` to allow the `@` special character in query string searches ([#7702](elastic/eui#7702)) - Added a new, optional `optionMatcher` prop to `EuiSelectable` and `EuiComboBox` allowing passing a custom option matcher function to these components and controlling option filtering for given search string ([#7709](elastic/eui#7709)) **Bug fixes** - Fixed an `EuiPageTemplate` bug where prop updates would not cascade down to child sections ([#7648](elastic/eui#7648)) - To cascade props down to the sidebar, `EuiPageTemplate` now explicitly requires using the `EuiPageTemplate.Sidebar` rather than `EuiPageSidebar` - Fixed `EuiFieldNumber`'s typing to accept an icon configuration shape ([#7666](elastic/eui#7666)) - Fixed `EuiFieldText` and `EuiFieldNumber` to render the correct paddings for icon shapes set to `side: 'right'` ([#7666](elastic/eui#7666)) - Fixed `EuiFieldText` and `EuiFieldNumber` to fully ignore `icon`/`prepend`/`append` when `controlOnly` is set to true ([#7666](elastic/eui#7666)) - Fixed `EuiColorPicker`'s input not setting the correct right padding for the number of icons displayed ([#7666](elastic/eui#7666)) - Visual fixes for `EuiRange`s with `showInput`: ([#7678](elastic/eui#7678)) - Longer `append`/`prepend` labels no longer cause a background bug - Inputs can no longer overwhelm the actual range in width - Fixed a visual text alignment regression in `EuiTableRowCell`s with the `row` header scope ([#7681](elastic/eui#7681)) - Fixed `toolTipProps` type on `EuiSuperUpdateButton` to use `Partial<EuiToolTipProps>` ([#7692](elastic/eui#7692)) - Fixes missing prop type for `popperProps` on `EuiDatePicker` ([#7694](elastic/eui#7694)) - Fixed a focus bug with `EuiDataGrid`s with `leadingControlColumns` when moving columns to the left/right ([#7701](elastic/eui#7701)) ([#7698](elastic/eui#7698)) - Fixed `EuiSuperDatePicker` to validate date string with respect of locale on `EuiAbsoluteTab`. ([#7705](elastic/eui#7705)) - Fixed a visual bug with `EuiSuperDatePicker`'s absolute tab on small mobile screens ([#7708](elastic/eui#7708)) - Fixed i18n of empty and loading state messages for the `FieldValueSelectionFilter` component ([#7718](elastic/eui#7718)) **Dependency updates** - Updated `@hello-pangea/dnd` to v16.6.0 ([#7599](elastic/eui#7599)) - Updated `remark-rehype` to v8.1.0 ([#7601](elastic/eui#7601)) **Accessibility** - Improved `EuiBasicTable` and `EuiInMemoryTable`'s selection checkboxes to have unique aria-labels per row ([#7672](elastic/eui#7672)) - Added `aria-valuetext` attributes to `EuiRange`s with tick labels for improved screen reader UX ([#7675](elastic/eui#7675)) - Updated `EuiAccordion` to keep focus on accordion trigger instead of moving to content on click/keypress ([#7696](elastic/eui#7696)) - Added `aria-disabled` attribute to `EuiHorizontalSteps` when status is "disabled" ([#7699](elastic/eui#7699)) --------- Co-authored-by: Tomasz Kajtoch <tomasz.kajtoch@elastic.co>
cee-chen
added a commit
to elastic/kibana
that referenced
this pull request
May 9, 2024
👋 Hey y'all ent search folks! I missed this fix/update update in our latest EUI upgrade (#182023). It's directly related to this change in EUI v94.2.0: > - Fixed an `EuiPageTemplate` bug where prop updates would not cascade down to child sections ([#7648](elastic/eui#7648)) > - To cascade props down to the sidebar, `EuiPageTemplate` now explicitly requires using the `EuiPageTemplate.Sidebar` rather than `EuiPageSidebar` In general, it's also a best practice to use EuiPageTemplate's namespaced children instead of the direct `EuiPage*` components (which are meant for direct usage within a`EuiPage` component instead), so I've made similar changes to your code as well. I would suggest pulling down this PR to QA that your page still looks as expected/as before.
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
relates to #7481
This PR adds or updates additional component stories for the following components:
Additionally it adds a new storybook util function
enableFunctionToggleControlsto setup function props as toggle controls that trigger storybook actions.QA